home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 179 / 179.d81 / asteriod size (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  98 lines

  1. 5 poke55,.:poke56,56:clr
  2. 10 dv=peek(186):ifdv<8thendv=8
  3. 15 poke53280,0:poke53281,0:print"[147]"
  4. 16 poke53371,0
  5. 25 poke53272,31
  6. 30 ad=49152
  7. 35 sysad:sysad+12
  8. 38 bx$="[150][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180][157][180]"
  9. 40 print"[147]":sysad+9,5
  10. 42 printtab(4)"[158][215]ant to see [193]steriod [204]ist? [159][217]/[206]":poke198,.
  11. 43 geta$:ifa$<>"y"anda$<>"n"then43
  12. 44 ifa$="y"thengosub500
  13. 45 print"[147][150][219][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][220]":sysad+9,1
  14. 47 printbx$""tab(38)bx$
  15. 49 print"[150][255][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][168]"
  16. 55 rd=180/(NULL)
  17. 57 print"[158]"tab(1)"    [193][211][212][197][210][201][207][196]  [196][201][193][205][197][212][197][210]  [195][193][204][195][213][204][193][212][207][210]   "
  18. 60 print:printtab(2)"[159][193]pparent visual magnitude- ";:l9%=4:gosub355:v=q9
  19. 65 printtab(2)"[159][196]istance from [211]un [156](au):";:l9%=5:gosub355:r0=q9
  20. 70 printtab(2)"[159][196]istance from [197]arth [156](au):";:l9%=5:gosub355:d0=q9
  21. 75 printtab(2)"[159][197]arth-[211]un distance [156](au):";:l9%=5:gosub355:r=q9
  22. 80 printtab(2)"[159][193]steriod type -"
  23. 85 printtab(8)"[156][195] - [211] - [205] or [196]?":poke198,.
  24. 90 geta$:ifa$<>"c"anda$<>"s"anda$<>"m"anda$<>"d"then90
  25. 95 ifa$="c"thenp=.037
  26. 100 ifa$="s"thenp=.10
  27. 105 ifa$="m"thenp=.18
  28. 106 ifa$="d"thenp=.02
  29. 115 print
  30. 120 rem now entering the photometric slope
  31. 125 rem parameter (g), or if unknown
  32. 130 rem enter 0.15. value of g
  33. 132 g=.15
  34. 135 print:printtab(1)"[150][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]":sysad+9,3
  35. 140 ci=(r0^2+d0^2-r^2)/(2*r0*d0)
  36. 145 f=atn(sqr(1-ci*ci)/ci):ifci<0thenf=f+8
  37. 155 rem f = solar phase angle in radians
  38. 160 print:printtab(1)"[153][211]olar phase angle/phi, [219]:";f*rd
  39. 165 :
  40. 170 rem now calculate the asteriod's absolute magnitude by the method
  41. 175 rem in the 1993 ephemerides of minor planets
  42. 180 p1=exp(-3.33*(tan(f/2))^.63)
  43. 185 p2=exp(-1.87*(tan(f/2))^1.22)
  44. 190 h=v-5*log(d0*r0)/log(10)+2.5*log((1-g)*p1+g*p2)/log(10)
  45. 195 print:printtab(2)"[153][193]bsolute mag (h):";h
  46. 200 rem finally deduce the diameter of the asteriod
  47. 205 rem from its absolute magnitude and albedo
  48. 210 ld=3.12-.2*h-.5*log(p)/log(10)
  49. 215 d=10^ld
  50. 220 print:printtab(2)"[153][196]iameter (mi):";d*.6
  51. 225 gosub3000
  52. 230 goto40
  53. 355 q9$="":poke198,.
  54. 360 geta$
  55. 365 poke646,rnd(1)*15+1:print"*[157]";:ifa$=""then360
  56. 370 ifa$=chr$(13)thenprint" ":q9=val(q9$):return
  57. 375 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto397
  58. 380 iflen(q9$)>=l9%thensysad+9,20:goto360
  59. 385 if(a$>="0"anda$<="9")ora$="."then390
  60. 387 goto360
  61. 390 q9$=q9$+a$
  62. 395 print""a$;:sysad+9,2:goto360
  63. 397 print" [157][157] [157]";:goto360
  64. 500 print"[147][158][193][211][212][197][210][201][207][196][211]  [211][213][206] [193][213]s   [153][207][210][194][201][212]":sysad+9,21
  65. 510 print"[158][206][193][205][197][211]      [205][197][193][206] [196][201][211][212] [153][217][197][193][210][211]   [150][212][217][208][197]"
  66. 515 print"[158][195]eres      2.767     [153]4.61      [150][195]"
  67. 520 print"[158][200]ygiea     3.144     [153]5.59      [150][211]"
  68. 525 print"[158][197]unomia  [160][160]2.644     [153]4.30      [150][205]"
  69. 530 print"[158][208]syche     2.922     [153]5.00      [150][211]"
  70. 535 print"[158][200]erculina  2.772     [153]4.61      [150][205]"
  71. 540 print"[158][200]ermione   3.451     [153]6.37      [150][195]"
  72. 545 print"[158][198]reia      3.390     [153]6.30      [150][196]"
  73. 550 print"[158][201]ris       2.386     [153]3.68      [150][205]"
  74. 555 print"[158][206]emesis    2.750     [153]4.56      [150][196]"
  75. 560 print"[158][200]ebe       2.425     [153]3.78      [150][205]"
  76. 565 print"[158][193]letheia   3.139     [153]5.60      [150][195]"
  77. 570 print"[158][203]alliope   2.910     [153]4.97      [150][211]"
  78. 575 print"[158][215]inchester 2.998     [153]5.18      [150][195]"
  79. 580 print"[158][208]ertoria   3.406     [153]6.29   [160]  [150][195]"
  80. 585 print"[158][200]ilda      3.969     [153]7.92      [150][211]"
  81. 590 print"[158][194]ertha     3.184     [153]5.68      [150][195]"
  82. 600 print"[159][212]hese [193]steriods orbit in the [205]ain [194]elt."
  83. 605 print"[212]heir magnitudes vary from about 12-18,"
  84. 610 print"depending on their type and distance."
  85. 615 printtab(8)" [193]ny [203]ey to [195]ontinue ":poke198,.
  86. 620 geta$:ifa$=""then620
  87. 625 return
  88. 3000 poke214,19:print:printtab(8)"[159](1[159]) [212]ry another one
  89. 3010 [153][163]8)"open(2open) (NULL)o (NULL)(NULL)right$(NULL)val(NULL)(NULL)val (NULL)enu
  90. 3020 poke198,0
  91. 3030 geta$:ifa$<"1"ora$>"2"then3030
  92. 3040 ifa$="1"thenreturn
  93. 3050 sysad+15
  94. 3060 print"[147][144]load"chr$(34)"b.universe iv"chr$(34)","dv
  95. 3070 print"run28"
  96. 3080 poke631,13:poke632,13:poke198,2:end
  97. 10000 d=peek(186):n$="asteriod size":open15,d,15,"s0:"+n$:close15:saven$,d:end
  98.